Hi,
basically I'm using this structure at the moment:
SIP Users <----> Kamailio <-----> Asterisk <-----> PSTN
I have to add a diversion-functionality at kamailio-level, so to simply rewrite $ru with something else defined in the database. That's working without problems. For billing issues, I also have to add a Remote-Party-ID header, set to the SIP user, which initiated the redirect in the database.
Now to the problem:
When a call is coming from PSTN, it's passing the asterisk server, then at kamailio level $ru is rewritten and sent back to asterisk (I'm talking about a redirect to a number in PSTN here)
What I've seen from the logs is, that asterisk is seeing that it gets an invite back with the same call-id, and therefore it cancels the original invite and handles the whole call internally via the Local Channel. The Problem is, that in the invite sent from kamailio back to asterisk, I've set a Remote-Party-ID header to tell asterisk to set the Callerid correctly for billing purposes. Now it seems that asterisk is _ignoring_ this header from the second invite.
So is this an expected behavior ? If yes, how to do it correctly ?
Below you can see the verbose output of asterisk. Since the call is handled at "Local" Channels the function to read sip headers does not work. The only message I get is "thanks to SIP/tpsiptestproxyu01-00d0a0b8".
-- Called tpsiptestproxyu01/+435572949012
-- Now forwarding DAHDI/2-1 to 'Local/066480588134@from-internal' (thanks to SIP/tpsiptestproxyu01-00d0a0b8)
-- Executing [066480588134@from-internal:1] NoOp("Local/066480588134@from-internal-d69e;2", "435572501134") in new stack
[Dec 1 15:14:50] WARNING[20506]: chan_sip.c:15797 func_header_read: This function can only be used on SIP channels.
-- Executing [066480588134@from-internal:2] NoOp("Local/066480588134@from-internal-d69e;2", "") in new stack
-- Executing [066480588134@from-internal:3] Dial("Local/066480588134@from-internal-d69e;2", "DAHDI/G0/066480588134") in new stack
-- Requested transfer capability: 0x00 - SPEECH
-- Called G0/066480588134
-- DAHDI/124-1 is proceeding passing it to Local/066480588134@from-internal-d69e;2
-- Local/066480588134@from-internal-d69e;1 is proceeding passing it to DAHDI/2-1
In the SIP debug you can see that asterisk is cancelling the dialog with kamailio and doing it itself:
13:49:30.589054 IP [--ASTERISK--].5060 > [--KAMAILIO--].5060: SIP, length: 938
E.......@..L..,L..,N........INVITE sip:+435572949012@[--KAMAILIO--] SIP/2.0
Via: SIP/2.0/UDP [--ASTERISK--]:5060;branch=z9hG4bK5629d66b;rport
Max-Forwards: 70
From: "435572501134" <sip:435572501134@[--ASTERISK--]>;tag=as27658014
To: <sip:+435572949012@[--KAMAILIO--]>
Contact: <sip:435572501134@[--ASTERISK--]>
Call-ID: 4bbee84339a9e2d30850185317983625@[--ASTERISK--]
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.1.5
Remote-Party-ID: "435572501134" <sip:435572501134@[--ASTERISK--]>;privacy=off;screen=yes
Date: Tue, 01 Dec 2009 12:49:30 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 263
v=0
o=root 930830518 930830518 IN IP4 [--ASTERISK--]
s=Asterisk PBX 1.6.1.5
c=IN IP4 [--ASTERISK--]
t=0 0
m=audio 16924 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
13:49:30.591037 IP [--KAMAILIO--].5060 > [--ASTERISK--].5060: SIP, length: 342
E..r..@.@.[0..,N..,L.....^.aSIP/2.0 100 Trying
Via: SIP/2.0/UDP [--ASTERISK--]:5060;branch=z9hG4bK5629d66b;rport=5060
From: "435572501134" <sip:435572501134@[--ASTERISK--]>;tag=as27658014
To: <sip:+435572949012@[--KAMAILIO--]>
Call-ID: 4bbee84339a9e2d30850185317983625@[--ASTERISK--]
CSeq: 102 INVITE
Server: OpenSER (1.3.2-notls (x86_64/linux))
Content-Length: 0
13:49:30.594345 IP [--KAMAILIO--].5060 > [--ASTERISK--].5060: SIP, length: 1093
E..a..@.@.XA..,N..,L.....M+LINVITE sip:066480588134@[--ASTERISK--]:5060;transport=udp SIP/2.0
Record-Route: <sip:[--KAMAILIO--];lr;ftag=as27658014>
Via: SIP/2.0/UDP [--KAMAILIO--];branch=z9hG4bK06.05390227.0
Via: SIP/2.0/UDP [--ASTERISK--]:5060;branch=z9hG4bK5629d66b;rport=5060
Max-Forwards: 69
From: "435572501134" <sip:435572501134@[--ASTERISK--]>;tag=as27658014
To: <sip:+435572949012@[--KAMAILIO--]>
Contact: <sip:435572501134@[--ASTERISK--]>
Call-ID: 4bbee84339a9e2d30850185317983625@[--ASTERISK--]
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.1.5
Date: Tue, 01 Dec 2009 12:49:30 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 263
Remote-Party-ID: "435572949012" <sip:435572949012@tpseru01.tele.net>;party=caller;privacy=none;screen=yes
v=0
o=root 930830518 930830518 IN IP4 [--ASTERISK--]
s=Asterisk PBX 1.6.1.5
c=IN IP4 [--ASTERISK--]
t=0 0
m=audio 16924 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
13:49:30.594605 IP [--ASTERISK--].5060 > [--KAMAILIO--].5060: SIP, length: 460
E.......@..)..,L..,N....... CANCEL sip:+435572949012@[--KAMAILIO--] SIP/2.0
Via: SIP/2.0/UDP [--ASTERISK--]:5060;branch=z9hG4bK5629d66b;rport
Max-Forwards: 70
From: "435572501134" <sip:435572501134@[--ASTERISK--]>;tag=as27658014
To: <sip:+435572949012@[--KAMAILIO--]>
Call-ID: 4bbee84339a9e2d30850185317983625@[--ASTERISK--]
CSeq: 102 CANCEL
User-Agent: Asterisk PBX 1.6.1.5
Remote-Party-ID: "435572501134" <sip:435572501134@[--ASTERISK--]>;privacy=off;screen=yes
Content-Length: 0
13:49:30.596307 IP [--KAMAILIO--].5060 > [--ASTERISK--].5060: SIP, length: 387
E.....@.@.[...,N..,L.......KSIP/2.0 200 canceling
Via: SIP/2.0/UDP [--ASTERISK--]:5060;branch=z9hG4bK5629d66b;rport=5060
From: "435572501134" <sip:435572501134@[--ASTERISK--]>;tag=as27658014
To: <sip:+435572949012@[--KAMAILIO--]>;tag=45db18648893e7acabf725621374d382-4ddb
Call-ID: 4bbee84339a9e2d30850185317983625@[--ASTERISK--]
CSeq: 102 CANCEL
Server: OpenSER (1.3.2-notls (x86_64/linux))
Content-Length: 0
13:49:30.596801 IP [--KAMAILIO--].5060 > [--ASTERISK--].5060: SIP, length: 396
E.....@.@.Z...,N..,L.......kSIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP [--ASTERISK--]:5060;branch=z9hG4bK5629d66b;rport=5060
From: "435572501134" <sip:435572501134@[--ASTERISK--]>;tag=as27658014
To: <sip:+435572949012@[--KAMAILIO--]>;tag=45db18648893e7acabf725621374d382-4ddb
Call-ID: 4bbee84339a9e2d30850185317983625@[--ASTERISK--]
CSeq: 102 INVITE
Server: OpenSER (1.3.2-notls (x86_64/linux))
Content-Length: 0
13:49:30.596842 IP [--ASTERISK--].5060 > [--KAMAILIO--].5060: SIP, length: 539
E..7....@.....,L..,N.....#.oACK sip:+435572949012@[--KAMAILIO--] SIP/2.0
Via: SIP/2.0/UDP [--ASTERISK--]:5060;branch=z9hG4bK5629d66b;rport
Max-Forwards: 70
From: "435572501134" <sip:435572501134@[--ASTERISK--]>;tag=as27658014
To: <sip:+435572949012@[--KAMAILIO--]>;tag=45db18648893e7acabf725621374d382-4ddb
Contact: <sip:435572501134@[--ASTERISK--]>
Call-ID: 4bbee84339a9e2d30850185317983625@[--ASTERISK--]
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.1.5
Remote-Party-ID: "435572501134" <sip:435572501134@[--ASTERISK--]>;privacy=off;screen=yes
Content-Length: 0
Thanks,
Florian
Hello
I'm trying to register in Kamailio, an Asterisk working behind Nat.
Here is the trunk:
The problem is: Asterisk is registering with its internal IP
(192.168.1.25), as you can see here:
sip:s@192.168.1.25 Q=
Expires:: 81
Callid:: 480b40aa13ddd8707787b21a69656535(a)127.0.0.1
Cseq:: 103
User-agent:: Asterisk PBX
How can I force Asterisk to register with its public IP?
Is there some configuration I can do in Kamailio?
Thanks
Regards
Joao Pereira
--
StarTel - A Rede Livre
Joao Gomes Pereira
www.startel.pt
+351 304500650
sip: gomespereira(a)startel.pt
Hi List,
Apologies if you get this twice, for some reason the last post didn't seem to appear on the list..
I am running Debian lenny. Can I just change the repos in sources.list from lenny to testing and unstable to get the correct python dependencies etc for the ag-project tools?
Thanks,
Brian
Hello,
Is it possible to do that : ?
t_on_reply("1");
t_on_failure("1");
t_relay();
François
P Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
yes it does:
[root@atl-sipgateway1 ~]# ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:1e:c9:b6:4c:fa brd ff:ff:ff:ff:ff:ff
inet 67.220.XX.XX/27 brd 67.220.XX.XX scope global eth0
inet 67.220.XX.XX/27 brd 67.220.XX.XX scope global secondary eth0:1
inet6 fe80::21e:c9ff:feb6:4cfa/64 scope link
valid_lft forever preferred_lft forever
On Mon, Nov 30, 2009 at 12:15 PM, Alex Hermann <alex(a)speakup.nl> wrote:
> On Sunday 29 November 2009 20:57:59 Geoffrey Mina wrote:
>> I have a Kamailio machine that has multiple IPs assigned to a single
>> interface.
>>
>> eth0 = 1.2.3.4
>> eth0:1 = 1.2.3.5
>
> No idea if it has any influence on Kamailio behaviour, but those seem to be
> two interfaces as far as applications are concerned. Assigning multiple IP's
> to one interface means that for all IP's, the interface should be the same.
>
> Does 'ip addr show dev eth0' show 2 IP's?
>
> --
> Alex Hermann
>
> _______________________________________________
> Kamailio (OpenSER) - Users mailing list
> Users(a)lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>