Hello,
After watching Matt Jordan’s presentation at Kamailio World Conf in 2016 , I decided to switch architecture chan_sip to pjsip.
So i started to testing Pjsip that is suitable for our system because There is always a feature that can be forgetten , missing or has a bug.
First of all , i realized that to header manipulation is removed with exclamation mark in Pjsip.
I tried to some configuration with outbound parameters.But i failed. Maybe , i couldnt find way to change it.
In Addition , i realized that it changes to header with the same as Request Uri Number on lr mode!
In conclusion , I already sent a topic to Forum and then couldn’t find solution with jcolp ,So is it possible to Add a Function about Setting To header Number like CallerId In Pjsip?
How can we solve this problem? I dont want to add a purge about To header in Kamailio because it can be breakable on ACK ,200-OK or other transacations. Asterisk is so good about dialog transacations.
Why i am trying to do that? Because some kind of FXS devices need to waits Request Uri Number and To header Number must be same ,if not it declines the calls.Kamailio Modules can only remove/add prefix/suffix on Request Uri Number(Carrier Module).
Thanks for Helps.
Yasin CANER
Here is Flow;
KamailioIP:5060 --> AsteriskIP:5060
x x
xINVITE sip:102105066109057atAsteriskIP:5060 SIP/2.0
xRecord-Route: sip:KamailioIP;lr;ftag=c963d657
Via: SIP/2.0/UDP KamailioIP;branch=z9hG4bKcdef.f
xVia: SIP/2.0/UDP 192.168.0.223:64556
xContact: sip:8503023423atUac1IP:3321;transport=UDP
xTo: sip:05066109057atKamailioIP;transport=UDP
xFrom: "8503023423"sip:8503023423atKamailioIP;transport=UDP;tag=c963d6
xCall-ID: 2tiU_X3S8_qbX3K0nOFYeQ…
xCSeq: 2 INVITE
xAllow: INVITE, ACK, CANCEL, BYE
AsteriskIP:5060 ---> KamailioIP:5060
x INVITE (SDP) x
xINVITE sip:102105066109057atKamailioIP:5060 SIP/2.0
xVia: SIP/2.0/UDP AsteriskIP:5060;rport;branch=z9hG4b
xFrom: “8503023423” sip:8503023423atAsteriskIP;tag=a21fc
xTo: sip:102105066109057atKamailioIP
xContact: sip:asteriskatAsteriskIP:5060
xCall-ID: d170e273-6bcc-474b-9816-a6b884419ff2
xCSeq: 23680 INVITE
xRoute: sip:KamailioIP;lr
xAllow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE
xUser-Agent: Asterisk PBX 14.0.1
xContent-Type: application/sdp
xContent-Length: 259
Here is architecture;
Kamailio -> registrar server , location server , edge server …
Asterisk -> Application server , RTP server …
|||||||
| UAC1|
|||||||
^
|
|
|||||||||||| ||||||||||||||
| |<---------- | |
| Kamailio | | Asterisk* |
| |----------> | |
|||||||||||| ||||||||||||||
^
|
|
|
|||||||
| UAC2|
|||||||
Here is my pjsip.conf
[global]
max_forwards=30
user_agent=TEST
keep_alive_interval=60
[simpletrans]
type=transport
protocol=udp
bind=AsteriskIP
[kamailio]
type=endpoint
transport=simpletrans
context=netgsm
disallow=all
allow=ulaw
allow=alaw
;outbound_proxy=sip:kamailioIP
outbound_proxy=sip:kamailioIP;lr
[kamailio]
type=identify
endpoint=kamailio
match=kamailioIP