Jump to content

SIP headers

Comtec Neil

Recommended Posts

Hello all, first-time poster so please be gentle!

I've just discovered Vodia and am loving it.  I have an issue with a SIP provider in the UK I'm hoping someone can help me with.  

My SIP provider presents the To: part of a SIP header in a peculiar way.  When a call comes in via SIP it is supposed to present the DDI (Say 01752422954) in the To: part, instead they present the registration username.  It's annoying, but they are a brill provider so I live with it. 

In asterisk I use a little bit of code to process the SIP header:

exten => _.,1,Noop(Getting DID from SIP header)
exten => _.,n,Set(pseudodid=${SIP_HEADER(To)})
exten => _.,n,Set(pseudodid=${CUT(pseudodid,@,1)})
exten => _.,n,Set(pseudodid=${CUT(pseudodid,:,2)})
exten => _.,n,Set(CALLERID(num)=${CALLERID(num)})

exten => _.,n,Goto(from-trunk,${pseudodid},1)

Is there a similar way of processing the SIP headers in Vodia?  I asked support but I really struggled to articulate my problem.


On Vodia, this is the behaviour:

When I set up a DID of 01752422954  I get busy signal when I call 01752422954

When I set up a DID of 0ec7e90dff the call proceed correctly when I call 01752422954

Here's my SIP invite:

INVITE sip:0ec7e90dff@;transport=udp;line=eccbc87e SIP/2.0
Via: SIP/2.0/UDP;rport;branch=z9hG4bK-sYn-0-fslogtjv%ho._dyjs!lna!dezu_hggzl
Max-Forwards: 15
Contact: <sip:uaba605f22@;transport=udp>
From: <sip:07931828049@proxy.voip.co.uk>;tag=55a8a3d28b
To: <sip:01752422954@proxy.voip.co.uk;user=phone>
Call-ID: f8b51a1e-c60e-11e8-9188-1daf01f298ce
CSeq: 113514872 INVITE
Supported: from-change
Accept: application/sdp
User-Agent: Synergy/
Content-Type: application/sdp
Content-Length: 318
Date: Tue, 02 Oct 2018 06:47:03 GMT

o=root 1260356252 1260356252 IN IP4
s="V4U SBC v2.0"
c=IN IP4
t=0 0
m=audio 15620 RTP/AVP 8 0 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16

Many thanks,



Link to comment
Share on other sites

In the "Routing/Redirection" section of the trunk settings, there are several ways to get this done. There you can set the source to "To-header" (not the request URI). For pulling out your extension in Europe is usually easy because all numbers have a certain prefix that you can put into the "match extension after prefix" mode - for example if 954 would be your extension you could set the prefix to 752422. This way you don't have to set up DID for each and every account and just use a general rule how to find it from the caller-ID.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...