[OpenSIPS-Users] R: R: Wesip and Opensips

Mauro Davi' mauro.davi at acotel.com
Fri Mar 20 15:10:42 CET 2009


Hi Ginés,

 

in the server.xml wesip configuration file I add the following line:

 

<property key="com.voztele.javax.sip.SPIRAL_HDR" value="true"/>

 

The opensips log says me that:

 

The wesip INVITE pass trought the local_route function and it don't re-enter in the Opensips again.... You can see it in the below log it is in bold

 

The sip message is sent to the production server IP... You can see it in the below log it is in red bold

 

The production server IP (that isn't my test opensips server) rensponde with 403 Forbidden... You can see it in the below log it is in blue bold

 

So, in my scenarious I never see the SIP message with the SPIRAL_HDR in the route{} function... Perhaps I need to use a real domain name... I think...

 

Please, any other suggestions???

 

Regards,

            MD

 

Below the opensips log file:

 

Mar 20 14:47:04 [20679] DBG:seas:process_input: read 408 bytes from AS action socket (total = 408)

Mar 20 14:47:04 [20679] DBG:seas:process_action: Processing action 408 bytes long

Mar 20 14:47:04 [20679] DBG:seas:process_action: Processing an UAC REQUEST action from AS (length=408): wesipapp

Mar 20 14:47:04 [20679] DBG:seas:ac_uac_req: Action UAC Message: uac_id:532438880 processor_id=1

Mar 20 14:47:04 [20679] DBG:seas:parse_ac_msg: Action Message:[INVITE sip:003955223344 at domain.com SIP/2.0

Call-ID: 69B5604EA6CF791ECB903674779B72F6 at localhost

CSeq: 1 INVITE

From: <sip:003955223344 at domain.com>;tag=1A73A93AB8753C253342CF1DB2C03DFF

To: <sip:003955223344 at domain.com>

Max-Forwards: 70

Contact: <sip:192.168.193.75:5060;transport=udp;AppId=.click2call>

Via: SIP/2.0/UDP 192.168.193.75:5060;branch=z9hG4bK532438880

Content-Length: 0

 

]

Mar 20 14:47:04 [20679] DBG:core:parse_msg: SIP Request:

Mar 20 14:47:04 [20679] DBG:core:parse_msg:  method:  <INVITE>

Mar 20 14:47:04 [20679] DBG:core:parse_msg:  uri:     <sip:003955223344 at domain.com>

Mar 20 14:47:04 [20679] DBG:core:parse_msg:  version: <SIP/2.0>

Mar 20 14:47:04 [20679] DBG:core:parse_headers: flags=2

Mar 20 14:47:04 [20679] DBG:core:get_hdr_field: cseq <CSeq>: <1> <INVITE>

Mar 20 14:47:04 [20679] DBG:core:parse_to: end of header reached, state=10

Mar 20 14:47:04 [20679] DBG:core:parse_to: display={}, ruri={sip:003955223344 at domain.com}

Mar 20 14:47:04 [20679] DBG:core:get_hdr_field: <To> [32]; uri=[sip:003955223344 at domain.com] 

Mar 20 14:47:04 [20679] DBG:core:get_hdr_field: to body [<sip:003955223344 at domain.com>

]

Mar 20 14:47:04 [20679] DBG:core:parse_via_param: found param type 232, <branch> = <z9hG4bK532438880>; state=16

Mar 20 14:47:04 [20679] DBG:core:parse_via: end of header reached, state=5

Mar 20 14:47:04 [20679] DBG:core:parse_headers: via found, flags=2

Mar 20 14:47:04 [20679] DBG:core:parse_headers: this is the first via

Mar 20 14:47:04 [20679] DBG:core:parse_headers: flags=ffffffffffffffff

Mar 20 14:47:04 [20679] DBG:core:get_hdr_field: content_length=0

Mar 20 14:47:04 [20679] DBG:core:get_hdr_field: found end of header

Mar 20 14:47:04 [20679] DBG:core:parse_headers: flags=ffffffffffffffff

Mar 20 14:47:04 [20679] DBG:core:parse_to_param: tag=1A73A93AB8753C253342CF1DB2C03DFF

Mar 20 14:47:04 [20679] DBG:core:parse_to: end of header reached, state=29

Mar 20 14:47:04 [20679] DBG:core:parse_to: display={}, ruri={sip:003955223344 at domain.com}

Mar 20 14:47:04 [20679] DBG:core:parse_headers: flags=78

Mar 20 14:47:04 [20679] DBG:seas:extract_allowed_headers: Skipping header (Call-ID)

Mar 20 14:47:04 [20679] DBG:seas:extract_allowed_headers: Skipping header (CSeq)

Mar 20 14:47:04 [20679] DBG:seas:extract_allowed_headers: Skipping header (From)

Mar 20 14:47:04 [20679] DBG:seas:extract_allowed_headers: Skipping header (To)

Mar 20 14:47:04 [20679] DBG:seas:extract_allowed_headers: Stripping vias [Via: SIP/2.0/UDP 192.168.193.75:5060;branch=z9hG4bK532438880

]

Mar 20 14:47:04 [20679] DBG:seas:extract_allowed_headers: Skipping header (Content-Length)

Mar 20 14:47:04 [20679] DBG:tm:t_uac: next_hop=<sip:003955223344 at domain.com>

Mar 20 14:47:04 [20679] DBG:core:mk_proxy: doing DNS lookup...

Mar 20 14:47:04 [20679] DBG:core:sip_resolvehost: no port, no proto -> do NAPTR lookup!

Mar 20 14:47:04 [20679] DBG:core:get_record: lookup(domain.com, 35) failed

Mar 20 14:47:04 [20679] DBG:core:sip_resolvehost: no valid NAPTR record found for domain.com, trying direct SRV lookup...

Mar 20 14:47:04 [20679] DBG:core:do_srv_lookup: SRV(_sip._udp.domain.com) = voip5.domain.com:443

Mar 20 14:47:04 [20679] DBG:core:a2dns_node: storing voip1.domain.com:5060

Mar 20 14:47:04 [20679] DBG:core:get_out_socket: socket determined: 0x8197fe0

Mar 20 14:47:04 [20679] DBG:tm:dlg2hash: 28079

Mar 20 14:47:04 [20679] DBG:tm:print_request_uri: sip:003955223344 at domain.com

Mar 20 14:47:04 [20679] DBG:tm:t_uac: building sip_msg from buffer

Mar 20 14:47:04 [20679] DBG:core:parse_msg: SIP Request:

Mar 20 14:47:04 [20679] DBG:core:parse_msg:  method:  <INVITE>

Mar 20 14:47:04 [20679] DBG:core:parse_msg:  uri:     <sip:003955223344 at domain.com>

Mar 20 14:47:04 [20679] DBG:core:parse_msg:  version: <SIP/2.0>

Mar 20 14:47:04 [20679] DBG:core:parse_headers: flags=2

Mar 20 14:47:04 [20679] DBG:core:parse_via_param: found param type 232, <branch> = <z9hG4bKfad6.b890cd35.0>; state=16

Mar 20 14:47:04 [20679] DBG:core:parse_via: end of header reached, state=5

Mar 20 14:47:04 [20679] DBG:core:parse_headers: via found, flags=2

Mar 20 14:47:04 [20679] DBG:core:parse_headers: this is the first via

INVITE INTERNALLY GENERATED!!!

Mar 20 14:47:04 [20679] DBG:core:parse_headers: flags=10

Mar 20 14:47:04 [20679] DBG:core:parse_to: end of header reached, state=9

Mar 20 14:47:04 [20679] DBG:core:parse_to: display={}, ruri={sip:003955223344 at domain.com}

Mar 20 14:47:04 [20679] DBG:core:get_hdr_field: <To> [30]; uri=[sip:003955223344 at domain.com] 

Mar 20 14:47:04 [20679] DBG:core:get_hdr_field: to body [sip:003955223344 at domain.com

]

Mar 20 14:47:04 [20679] DBG:core:parse_to_param: tag=1A73A93AB8753C253342CF1DB2C03DFF

Mar 20 14:47:04 [20679] DBG:core:parse_to: end of header reached, state=29

Mar 20 14:47:04 [20679] DBG:core:parse_to: display={}, ruri={sip:003955223344 at domain.com}

Mar 20 14:47:04 [20679] DBG:core:db_new_result: allocate 28 bytes for result set at 0x81cf1e0

Mar 20 14:47:04 [20679] DBG:db_mysql:db_mysql_get_columns: 1 columns returned from the query

Mar 20 14:47:04 [20679] DBG:core:db_allocate_columns: allocate 4 bytes for result names at 0x81cefd8

Mar 20 14:47:04 [20679] DBG:core:db_allocate_columns: allocate 4 bytes for result types at 0x81cee70

Mar 20 14:47:04 [20679] DBG:db_mysql:db_mysql_get_columns: allocate 8 bytes for RES_NAMES[0] at 0x81cefa0

Mar 20 14:47:04 [20679] DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x81cefa0)[0]=[domain]

Mar 20 14:47:04 [20679] DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type

Mar 20 14:47:04 [20679] DBG:db_mysql:db_mysql_convert_rows: allocate 8 bytes for rows at 0x81cf208

Mar 20 14:47:04 [20679] DBG:db_mysql:db_mysql_convert_row: allocate 20 bytes for row values at 0x81cf218

Mar 20 14:47:04 [20679] DBG:db_mysql:db_mysql_str2val: converting STRING [domain.com]

Mar 20 14:47:04 [20679] DBG:domain:is_domain_local: Realm 'domain.com' is local

Mar 20 14:47:04 [20679] DBG:core:db_free_columns: freeing 1 columns

Mar 20 14:47:04 [20679] DBG:core:db_free_columns: freeing RES_NAMES[0] at 0x81cefa0

Mar 20 14:47:04 [20679] DBG:core:db_free_columns: freeing result names at 0x81cefd8

Mar 20 14:47:04 [20679] DBG:core:db_free_columns: freeing result types at 0x81cee70

Mar 20 14:47:04 [20679] DBG:core:db_free_rows: freeing 1 rows

Mar 20 14:47:04 [20679] DBG:core:db_free_row: freeing row values at 0x81cf218

Mar 20 14:47:04 [20679] DBG:core:db_free_rows: freeing rows at 0x81cf208

Mar 20 14:47:04 [20679] DBG:core:db_free_result: freeing result set at 0x81cf1e0

<sip:003955223344 at domain.com> BEFORE INVITE INTERNALLY GENERATED!!!

<sip:003955223344 at domain.com> AFTER INVITE INTERNALLY GENERATED!!!

Mar 20 14:47:04 [20679] DBG:core:mk_proxy: doing DNS lookup...

Mar 20 14:47:04 [20679] DBG:core:sip_resolvehost: no port, no proto -> do NAPTR lookup!

Mar 20 14:47:04 [20679] DBG:core:get_record: lookup(domain.com, 35) failed

Mar 20 14:47:04 [20679] DBG:core:sip_resolvehost: no valid NAPTR record found for domain.com, trying direct SRV lookup...

Mar 20 14:47:04 [20679] DBG:core:do_srv_lookup: SRV(_sip._udp.domain.com) = voip5.domain.com:443

Mar 20 14:47:04 [20679] DBG:core:a2dns_node: storing voip1.domain.com:5060

Mar 20 14:47:04 [20679] DBG:core:check_via_address: params 192.168.193.75, 192.168.193.75, 0

Mar 20 14:47:04 [20679] DBG:core:forward_request: sending:

INVITE sip:003955223344 at domain.com SIP/2.0

Via: SIP/2.0/UDP 192.168.193.75;branch=z9hG4bKfad6.b890cd35.0

Via: SIP/2.0/UDP 192.168.193.75;branch=z9hG4bKfad6.b890cd35.0

To: sip:003955223344 at domain.com

From: sip:003955223344 at domain.com;tag=1A73A93AB8753C253342CF1DB2C03DFF

CSeq: 1 INVITE

Call-ID: 69B5604EA6CF791ECB903674779B72F6 at localhost

Content-Length: 0

Max-Forwards: 70

Contact: <sip:192.168.193.75:5060;transport=udp;AppId=.click2call>

 

.

Mar 20 14:47:04 [20679] DBG:core:forward_request: orig. len=391, new_len=454, proto=1

Mar 20 14:47:04 [20679] DBG:tm:t_uac: re-building the buffer (sip_msg changed) - lumps are0x81cf1e0 (nil)

Mar 20 14:47:04 [20679] DBG:tm:set_timer: relative timeout is 500000

Mar 20 14:47:04 [20679] DBG:tm:insert_timer_unsafe: [4]: 0xb616e844 (7100000)

Mar 20 14:47:04 [20679] DBG:tm:set_timer: relative timeout is 20

Mar 20 14:47:04 [20679] DBG:tm:insert_timer_unsafe: [0]: 0xb616e860 (26)

Mar 20 14:47:04 [20679] DBG:seas:process_input: (Action dispatched,buffer.len=0)

Mar 20 14:47:04 [20661] DBG:core:parse_msg: SIP Reply  (status):

Mar 20 14:47:04 [20661] DBG:core:parse_msg:  version: <SIP/2.0>

Mar 20 14:47:04 [20661] DBG:core:parse_msg:  status:  <100>

Mar 20 14:47:04 [20661] DBG:core:parse_msg:  reason:  <Trying>

Mar 20 14:47:04 [20661] DBG:core:parse_headers: flags=2

Mar 20 14:47:04 [20661] DBG:core:parse_via_param: found param type 232, <branch> = <z9hG4bKfad6.b890cd35.0>; state=6

Mar 20 14:47:04 [20661] DBG:core:parse_via_param: found param type 234, <received> = <194.184.159.6>; state=6

Mar 20 14:47:04 [20661] DBG:core:parse_via_param: found param type 235, <rport> = <1205>; state=16

Mar 20 14:47:04 [20661] DBG:core:parse_via: end of header reached, state=5

Mar 20 14:47:04 [20661] DBG:core:parse_headers: via found, flags=2

Mar 20 14:47:04 [20661] DBG:core:parse_headers: this is the first via

Mar 20 14:47:04 [20661] DBG:core:receive_msg: After parse_msg...

Mar 20 14:47:04 [20661] ERROR:tm:t_check_status: cannot check status for a reply which has no transaction-state established

Mar 20 14:47:04 [20661] DBG:core:forward_reply: found module tm, passing reply to it

Mar 20 14:47:04 [20661] DBG:tm:t_check: start=0xffffffff

Mar 20 14:47:04 [20661] DBG:core:parse_headers: flags=22

Mar 20 14:47:04 [20661] DBG:core:parse_via_param: found param type 232, <branch> = <z9hG4bKfad6.b890cd35.0>; state=16

Mar 20 14:47:04 [20661] DBG:core:parse_via: end of header reached, state=5

Mar 20 14:47:04 [20661] DBG:core:parse_headers: via found, flags=22

Mar 20 14:47:04 [20661] DBG:core:parse_headers: parse_headers: this is the second via

Mar 20 14:47:04 [20661] DBG:core:parse_to: end of header reached, state=10

Mar 20 14:47:04 [20661] DBG:core:parse_to: display={}, ruri={sip:003955223344 at domain.com}

Mar 20 14:47:04 [20661] DBG:core:get_hdr_field: <To> [32]; uri=[sip:003955223344 at domain.com] 

Mar 20 14:47:04 [20661] DBG:core:get_hdr_field: to body [<sip:003955223344 at domain.com>

]

Mar 20 14:47:04 [20661] DBG:core:get_hdr_field: cseq <CSeq>: <1> <INVITE>

Mar 20 14:47:04 [20661] DBG:core:parse_headers: flags=8

Mar 20 14:47:04 [20661] DBG:tm:t_reply_matching: hash 28079 label 1406929291 branch 0

Mar 20 14:47:04 [20661] DBG:tm:t_reply_matching: REF_UNSAFE: after is 1

Mar 20 14:47:04 [20661] DBG:tm:t_reply_matching: reply matched (T=0xb616e6f8)!

Mar 20 14:47:04 [20661] DBG:tm:t_check: end=0xb616e6f8

Mar 20 14:47:04 [20661] DBG:tm:reply_received: org. status uas=0, uac[0]=0 local=2 is_invite=1)

Mar 20 14:47:04 [20661] DBG:tm:t_should_relay_response: T_code=0, new_code=100

Mar 20 14:47:04 [20661] DBG:tm:local_reply: branch=0, save=0, winner=-1

Mar 20 14:47:04 [20661] DBG:tm:set_timer: relative timeout is 30

Mar 20 14:47:04 [20661] DBG:tm:insert_timer_unsafe: [1]: 0xb616e860 (36)

Mar 20 14:47:04 [20661] DBG:tm:t_unref: UNREF_UNSAFE: after is 0

Mar 20 14:47:04 [20661] DBG:core:destroy_avp_list: destroying list (nil)

Mar 20 14:47:04 [20661] DBG:core:receive_msg: cleaning up

Mar 20 14:47:04 [20661] DBG:core:parse_msg: SIP Reply  (status):

Mar 20 14:47:04 [20661] DBG:core:parse_msg:  version: <SIP/2.0>

Mar 20 14:47:04 [20661] DBG:core:parse_msg:  status:  <403>

Mar 20 14:47:04 [20661] DBG:core:parse_msg:  reason:  <Forbidden>

Mar 20 14:47:04 [20661] DBG:core:parse_headers: flags=2

________________________________

Da: Ginés Gómez [mailto:gines at voztele.com] 
Inviato: venerdì 20 marzo 2009 14:47
A: Mauro Davi'
Cc: users at lists.opensips.org
Oggetto: Re: [OpenSIPS-Users] R: Wesip and Opensips

 

Hi Mauro,

 

            afaik local_route is meant to be used only with OpenSIPS self generated requests (like CANCEL to forking branches) not with WeSIP. That is the reason why we implemented the SPIRAL_HDR feature. When you activate SPIRAL_HDR the messages generated by WeSIP will "enter" again in OpenSIPS thus you can catch them in the route function (not local_route). In order to identify them look for the X-WeSIP-SPIRAL header and then modify the message and relay it   with t_realy. Code would look something like this

 

route{

 

    if(is_present_hf("X-WeSIP-SPIRAL")){  

       /* modify your message here as required */

       t_relay();  

    }else{  

       as_relay_t("app_server_one");

    } 

}          

 

Regards

 

Ginés





Hola Gines,

 

I'm in a test environment and the domain that I use for every user is resolved with the production SIP server IP...(I haven't a DNS domain name associated to my test openser), obviously the production SIP server responde to every request with a 403 Forbidden message.

 

I don't know if this is the problem but with the wesip SPITAL_HDR set  to true, I see only the messages that start in the local_route function.

 

To avoid this problem, I'm trying to manipulate the message in the local_route function without good result :-(...

 

Is there another way to do this??

 

Regards

     MD

 

________________________________

Da: Ginés Gómez [mailto:gines at voztele.com] 
Inviato: venerdì 20 marzo 2009 12:46
A: Mauro Davi'
Cc: users at lists.opensips.org
Oggetto: Re: [OpenSIPS-Users] Wesip and Opensips

 

Ciao Mauro,

 

            first, you can manipulate messages from WeSIP itselft  before you send them out. Once they are sent out you can manipulate them in OpenSIPs script if you configure WeSIP to work in spiral mode. When working in spiral mode outgoing messages from WeSIP loop through OpenSIPs script in a new transaction before leaving. You can recognize them, and work accordingly if you look for the particular a header that is added by WeSIP. The header is  X-WeSIP-SPIRAL

 

NON-SPIRAL-MODE (Default)

 

Origin       [OpenSIPS     WeSIP]      Destination

   | ----t1----->| ----------->|------t2----->               

                                   Internal

                               Delivery

           

 

SPIRAL-MODE

 

Origin   [OpenSIPS       WeSIP]                OpenSIPS   Destination

     | ----t1-----> | ----------->|-----------t2------->| ----t3---> |                            

                                       Internal       X-WeSIP-Spiral  

                                   Delivery      

                                  

More on this kind of configuration at http://www.wesip.com/mediawiki/index.php/Configuration#com.voztele.javax.sip.SPIRAL_HDR

 

Hope that helps

 

Regards

 

Ginés

 

 






Hi All,

 

I'm setting up the Click2Dial wesip application, and I'm trying to use it.

 

When I start the call in the opensips script I need to manipulate it.

 

So in the local_route branch I try to see if the To party is an alias but I can't use alias_db_lookup function in the local_route branch...

 

Is this correct? How I can manipulate the messages generated by wesip ?

 

Thanks in advance

            MD

_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 

_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090320/e8159b69/attachment-0001.htm 


More information about the Users mailing list